void CreateBTree(BTree &BT,string str){
	queue<BTree>q;
	BTree T;
	int i=0;
	if(str[i]!='#'){
		BT=new BTNode;
		BT->data=str[i];
		BT->lchild=BT->rchild=NULL;
		i++;
		q.push(BT);
	}
	while(!q.empty()){
		T=q.front();
		q.pop();
		if(str[i]=='#') T->lchild=NULL;
		else {
			T->lchild=new BTNode;
			T->lchild->data=str[i];
			T->lchild->lchild=T->lchild->rchild=NULL;
			q.push(T->lchild);
		}
		i++;
		if(str[i]=='#') T->rchild=NULL;
		else {
			T->rchild=new BTNode;
			T->rchild->data=str[i];
			T->rchild->lchild=T->rchild->rchild=NULL;
			q.push(T->rchild);
		}
		i++;
	}
}
void PreOrder( BTree BT ){
	static int i=0;
	if(BT){
		if(i==0) cout<<BT->data;
		else cout<<" "<<BT->data;
		i++;
		PreOrder(BT->lchild);
		PreOrder(BT->rchild);
	}
} 
void InOrder( BTree BT ){
	static int i=0;
	if(BT){
		InOrder(BT->lchild);
		if(i==0) cout<<BT->data;
		else cout<<" "<<BT->data;
		i++;
		InOrder(BT->rchild);
	}
}
void PostOrder(BTree bt){
	static int i=0;
	if(bt){
		PostOrder(bt->lchild);
		PostOrder(bt->rchild);
		if(i==0) cout<<bt->data;
		else cout<<" "<<bt->data;
		i++;
	}
}
